home *** CD-ROM | disk | FTP | other *** search
- Path: bmtlh10.bnr.ca!news
- From: John Hickin <hickin@bnr.ca>
- Newsgroups: comp.lang.c
- Subject: Re: warning: possibly incorrect assignment
- Date: 9 Jan 1996 21:14:28 GMT
- Organization: Bell-Northern Research
- Message-ID: <4culrk$71g@bmtlh10.bnr.ca>
- References: <Pine.OSF.3.91.960109091920.6447A-100000@io.UWinnipeg.ca>
- NNTP-Posting-Host: bmtlh520.bnr.ca
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.01 9000/715)
- X-URL: news:Pine.OSF.3.91.960109091920.6447A-100000@io.UWinnipeg.ca
-
- |> **** while(fp=fopen(file_name,"r"))
-
- Rewrite it as follows:
-
- while ( (fp = fopen(file_name,"r")) != NULL )
-
- and odds are that your compiler will take the hint and not warn you.
-
- --
- John Hickin Bell-Northern Research, Montreal, Quebec
- (514) 765-7924 hickin@bnr.ca
-
-